#include<bits/stdc++.h>
using namespace std;
int main() {
	int  v, s;
//	cin>>s>>v;
	scanf("%d %d", &s, &v);
	float time_m = s * (1.0) / v;
	int h = 8, m = 0;
	m -= 10;
	while (time_m > 0) {
		time_m --;
		m--;
		if (m < 0) {
			m += 60;
			h--;
		}
	}
	if (h < 0) h += 24;
	

	printf("%02d:%02d", h, m);
	return 0;
}
